<%--
    Document   : employer_registration
    Created on : Apr 1, 2012, 2:31:56 AM
    Author     : Ajay kumar "mukund"
--%>

<%@page import="java.sql.ResultSet"%>
<%@page import="java.sql.Statement"%>
<%@page import="jobportal.Dbconn"%>
<%@page import="java.sql.Connection"%>
<%@page import="java.util.Random"%>

<%
    String captchasrc = "Captcha";
    long pass = 0;
    String dest = "CompanyRegister";
    String city="";
    if (session.getAttribute("username") != null && session.getAttribute("role").toString().equalsIgnoreCase("admin")) {
        captchasrc = "../" + captchasrc;
        dest = "../" + dest;
        city="../";
        Random rd = new Random();
        pass = rd.nextLong();
        if (pass < 0) {
            pass *= -1;
        }
    }
    Connection con = Dbconn.getConn();
    Statement st = con.createStatement();
    ResultSet rs = st.executeQuery("select distinct state from dist ");
%>


<script>
    $(document).ready(function(){
        $("#empregister").validationEngine();
        
        $('#state').change(function(e){
            $this = $(e.target);
        
            $.ajax({
                type: "POST",
                url: "<%=city%>src/loadcity.jsp", 
                data: "state="+$this.val(),
                success:function(data){
                    $('#city').html(data);
                }
            });
        });
 

    });
</script>

<table border="0" cellspacing="0" cellpadding="0" style="width:100%; height:auto;">
    <tbody>
        <tr>
            <td width="651" align="left" valign="top" style="padding-left:25px;">
                <form name="empregister" id="empregister" action="<%=dest%>" method="get"  >
                    <table width="100%" border="0" cellpadding="0" cellspacing="0">
                        <tbody><tr>
                                <td height="30" valign="bottom" style="padding-top:10px;"><div align="left" class="mainheading" style="padding-bottom:10px;">New Employer Registration</div><div class="heading_line_hor"><!-- --></div>
                                </td>
                            </tr>
                            <tr>
                                <td align="left"><div align="left" style="padding-top:10px;">Employers, to post your unlimited jobs ads please complete the following registration form.</div></td>
                            </tr>
                            <tr>
                                <td align="center" class="messagesred">
                                </td>
                            </tr>
                            <tr>
                                <td align="center">		<div align="right" style="padding-right:20px;"><span class="messagesred">*</span>Fields are mandatory</div></td>
                            </tr>
                        </tbody></table>
                    <img src="./company Registration_files/blank.gif" width="1" height="15">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-left:20px;">
                        <tbody>
                            <tr>
                                <td colspan="4"></td>
                            </tr>
                            <tr>
                                <td colspan="4"></td>
                            </tr>
                            <tr>
                                <td colspan="4"><strong>Login Information</strong><div class="line_spacer1"><!-- --></div></td>
                            </tr>
                            <tr>
                                <td colspan="2" rowspan="2" valign="top" style="padding-left:5px; width:200px;"><span class="messagesred">*</span> User id</td>
                                <td width="688" height="28" colspan="4" valign="middle"><input id="compid" size="25" name="compid" value="" class="validate[required]" >
                                    &nbsp; <span id="check_uname_div"></span>
                                    <div id="checkuserbox"></div></td>
                            </tr>
                            <tr>
                                <td height="22" colspan="4" valign="middle"><p>Note: Please enter only correct unique-id.</p></td>
                            </tr>


                            <%
                                if (session.getAttribute("username") != null && session.getAttribute("role").toString().equalsIgnoreCase("admin")) {
                            %>
                            <tr>
                                <td>
                                    <input type="hidden" id="pass1" name="password" value="<%=pass%>">
                                </td>
                            </tr>
                            <%    } else {%>
                            <tr>
                                <td height="28" colspan="2" valign="top" style="padding-left:5px;"><p><span class="messagesred">*</span> Password </p></td>
                                <td height="28" colspan="4" align="left" valign="middle"><input name="password" type="password" id="password" size="25" value="" class="validate[required,minSize[6]]"></td>
                            </tr>
                            <tr>
                                <td height="28" colspan="2" align="left" valign="middle" style="padding-left:5px;"><p><span class="messagesred">*</span> Confirm Password </p></td>
                                <td height="28" colspan="4" align="left" valign="middle"><input name="cpass" type="password" id="cpass" size="25" value="" class="validate[required,equals[password]] textfield"></td>
                            </tr>


                            <%}%>
                            <tr>
                                <td height="28" colspan="2" valign="top" style="padding-left:5px;">
                                    <p><span class="messagesred">*</span> Company Email </p>
                                </td>
                                <td colspan="4" align="left" valign="middle"><input id="email" size="25" name="email" value="" class="validate[required],custom[email], textfield">
                                    &nbsp; <span id="check_email_div"></span>
                                </td>
                            </tr>


                            <tr>
                                <td height="28" colspan="2" valign="top" style="padding-left:5px;"><p><span class="messagesred">*</span> Contact Name </p></td>
                                <td colspan="4" align="left" valign="middle"><input id="personname" size="25" name="personname" value="" class="validate[required],custom[onlyLetterSp]"></td>
                            </tr>
                            <tr>
                                <td height="28" colspan="2" valign="top" style="padding-left:5px;"><p><span class="messagesred">*</span> Designation </p></td>
                                <td colspan="4" align="left" valign="middle"><input id="designation" size="25" name="designation" value="" class="validate[required],custom[onlyLetterSp]"></td>
                            </tr>
                            <tr>
                                <td height="28" colspan="4" valign="top" style="padding-left:5px;"><strong>Contact Number</strong><div class="line_spacer1"><!-- --></div></td>
                            </tr>
                            <tr>
                                <td height="28" colspan="2" valign="top" style="padding-left:5px;"><span class="messagesred">*</span> Office</td>
                                <td colspan="4" align="left" valign="middle"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                        <tbody><tr>
                                                <td><input name="contact" id="contact" size="25" name="contact" value="" class="validate[required,minSize[10],maxSize[11]],custom[phone]"></td>
                                            </tr>
                                        </tbody></table></td>
                            </tr>
                            <tr>
                                <td height="28" colspan="2" valign="top" style="padding-left:15px;"><p>Fax </p></td>
                                <td colspan="4" align="left" valign="middle"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                        <tbody><tr>
                                                <td><input name="fax" id="fax" size="25" name="fax" value="" class="validate[required,minSize[10],maxSize[11]],custom[phone]"></td>
                                            </tr>
                                        </tbody></table></td>
                            </tr>
                            <tr>
                                <td height="28" colspan="2" valign="top" style="padding-left:5px;"><p><span class="messagesred"></span> Mobile </p></td>
                                <td colspan="4" align="left" valign="middle"><input name="mobile" id="mobile" size="25" name="mobile" value="" class="validate[required,minSize[10],maxSize[10]],custom[phone]">
                                    &nbsp; <span id="check_mobile_div"></span></td>
                            </tr>
                            <tr>
                                <td colspan="4" valign="top">&nbsp;</td>
                            </tr>
                            <tr>
                                <td height="28" colspan="3" style="padding-left:5px;"><strong>Company Information:</strong> <div class="line_spacer1"><!-- --></div></td>
                            </tr>
                            <tr>
                                <td height="28" colspan="2" valign="top" style="padding-left:5px;"><p><span class="messagesred">*</span> Company Name</p></td>
                                <td colspan="4" align="left" valign="middle"><input id="compname" size="25" name="compname" value="" class="validate[required],custom[onlyLetterSp]"></td>
                            </tr>
                            <tr>
                                <td valign="top" colspan="2" style="padding-left:5px;"><p><span class="messagesred">*</span> Company Address</p></td>
                                <td colspan="4" align="left" valign="middle"><textarea name="address" cols="40" rows="4" id="address" class="validate[required]"></textarea></td>
                            </tr>

                            <tr>
                                <td height="28" colspan="2" valign="top" style="padding-left:5px;"><span class="messagesred">*</span> State</td>
                                <td align="left" valign="middle"><div id="txtHint1">
                                        <select name="state" id="state" style="width: 200px;" class="validate[required],listmenu">
                                            <%
                                                while (rs.next()) {
                                                    out.println("<option value=\"" + rs.getString(1) + "\">" + rs.getString(1) + "</option>");
                                                }
                                            %>
                                        </select>
                                    </div>
                            </tr>
                            <tr>
                                <td height="28" colspan="2" valign="top" style="padding-left:5px;"><p><span class="messagesred">*</span> City </p></td>
                                <td align="left" valign="middle"><div id="txtHint12">
                                        <select name="city" id="city" style="width: 200px;" class="validate[required],listmenu">
                                            <option value="">Select City</option>
                                            <option value="Trivandrum">Trivandrum</option>
                                            <option value="Ranchi">Ranchi</option>
                                        </select>
                                    </div>
                            </tr>
                            <tr>
                                <td width="194" height="28" valign="top" style="padding-left:5px;"><p><span class="messagesred">*</span> Company Type</p></td>
                                <td colspan="4" align="left" valign="middle">
                                    <input id="type" type="radio" value="Placement Consultant" name="type"  class="radio" checked="checked">
                                    Placement Consultant <input id="type" type="radio" value="Corporate" name="type"  class="radio">Corporate</td><td colspan="4" align="left" valign="middle">
                                </td>
                            </tr>
                            <tr>
                                <td height="28" valign="top" style="padding-left:5px;"><span><span class="messagesred">*</span> Company Category Type </span></td>
                                <td colspan="4" align="left" valign="middle"><select name="cattype"  id="cattype" style="width: 230px" class="validate[required],listmenu">
                                        <option value="">--Select--</option>
                                        <option value="Accounting-Tax/Consulting">Accounting-Tax/Consulting</option>
                                        <option value="Architecture Interior Design">Architecture Interior Design</option>
                                        <option value="Automobiles">Automobiles</option>
                                        <option value="Banking/Financial">Banking/Financial</option>
                                        <option value="Biotech/Pharma">Biotech/Pharma</option>
                                        <option value="BPO/KPO">BPO/KPO</option>
                                        <option value="Bussiness management">Bussiness management</option>
                                        <option value="Construction/Engineering">Construction/Engineering</option>
                                        <option value="Entertainment/Media">Entertainment/Media</option>
                                        <option value="Graphic / Web Design">Graphic / Web Design</option>
                                        <option value="IT Hardware/Telecom">IT Hardware/Telecom</option>
                                        <option value="IT/Software Services">IT/Software Services</option>
                                        <option value="NA">NA</option>
                                        <option value="Software Development &amp; Sales">Software Development &amp; Sales</option>
                                        <option value="Supply Chain/Purchase">Supply Chain/Purchase</option>
                                    </select></td>
                            </tr>
                            <tr>
                                <td height="28" valign="top" style="padding-left:5px;"><p><span class="messagesred">*</span> Company Sector </p></td>
                                <td colspan="4" align="left" valign="middle"><select name="sector" class="validate[required],listmenu" id="sector" style="width: 230px">
                                        <option value="">---Select----</option>
                                        <option value="Government Organization">Government Organization</option>
                                        <option value="Government/Ministry">Government/Ministry</option>
                                        <option value="Mulitnational Corporation">Multinational Corporation</option>
                                        <option value="Non-Government Organization">Non-Government Organization</option>
                                        <option value="Others">Others</option>
                                        <option value="Private Limited">Private Limited</option>
                                        <option value="Small &amp; Medium Enterprise">Small &amp; Medium Enterprise</option>
                                        <option value="Sole Proprietor">Sole Proprietor</option>
                                        <option value="Statutory Board">Statutory Board</option>
                                        <option value="Utech">Utech</option>
                                    </select></td>
                            </tr>

                            <tr>
                                <td valign="top" style="padding-left:5px;"><span class="messagesred" >*</span> Company Profile </td>
                                <td colspan="4" align="left" valign="middle"><textarea id="wysiwyg" name="profile" cols="50" rows="15" class="validate[required]"></textarea></td>
                            </tr>



                            <tr>
                                <td height="34" valign="top" style="padding-left:5px;"><p><span class="messagesred">*</span>Website URL </p></td>
                                <td colspan="4" align="left" valign="middle"><input name="url" id="url" size="40" maxlength="100" value="" class="validate[required],custom[url]">
                                    (http://www.abc.com)</td>
                            </tr>

                            <tr>
                                <td height="37" valign="middle" style="padding-left:5px;"><span> Verification Code</span></td>
                                <td colspan="4" align="left" valign="middle"><input name="captcha" id="captcha" class="validate[required]" type="text" name="code" >

                                    <br/><img src="<%=captchasrc%>" >

                                </td>
                            </tr>
                            <tr>
                                <td colspan="3"><input type="checkbox" checked="checked" value="true" name="in_resume_1_termsconditions" class="checked">      I have read the  <span class="link"><a href="terms.jsp" target="_blank"><font color='#660000'>Terms   and Conditions</font> </a></span>and agree to be bound by them.          </td>
                            </tr>
                            <tr>
                                <td colspan="4" align="center" valign="middle" height="2"></td>
                            </tr>
                            <tr>
                                <td colspan="4" align="center" valign="middle" height="10px"><% if (request.getParameter("status") != null) {%>

                                    <%=request.getParameter("status")%>

                                    <%}%>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="4" align="center" valign="middle" height="10px">&nbsp;</td>
                            </tr>
                        </tbody>
                    </table>
                    <div style="padding-left:220px; padding-top:10px; padding-bottom:10px;"><input name="Submit" type="submit" value="Register" class="button2">&nbsp;&nbsp;<input name="Reset" type="reset" id="reset" value="Reset" class="button2"></div>
                </form>
            </td>




        </tr>





        <tr>
            <td align="center" valign="top" >
                <div class="bdy_spr" style="width: 100%">

                </div>

                <div class="bdy_spr" style="width: 100%"></div>
            </td>
        </tr>
    </tbody>
</table>
